import java.util.Arrays;
import java.util.Random;

public class Main {

	public static void main(String[] args) {
		int[] numbers = new int[1000];
		Random random = new Random();
		for (int i = 0; i < numbers.length; i++) {
			numbers[i] = random.nextInt();
		}

		int[] tmp = Arrays.copyOf(numbers, numbers.length);
		System.out.println(Arrays.toString(tmp));

		long startTime = System.currentTimeMillis();
		Arrays.sort(tmp);
		long endTime = System.currentTimeMillis();

		System.out.println("Arrays.sort():" + (endTime - startTime) + " milliseconds.");

		tmp = Arrays.copyOf(numbers, numbers.length);

		startTime = System.currentTimeMillis();
		ArraySorter.bubbleSort(tmp);
		endTime = System.currentTimeMillis();

		System.out.println("bubbleSort():" + (endTime - startTime) + " milliseconds.");

		tmp = Arrays.copyOf(numbers, numbers.length);

		startTime = System.currentTimeMillis();
		ArraySorter.InsertSort(tmp);
		endTime = System.currentTimeMillis();

		System.out.println("InsertSort():" + (endTime - startTime) + " milliseconds.");

		tmp = Arrays.copyOf(numbers, numbers.length);

		startTime = System.currentTimeMillis();
		ArraySorter.selectionSort(tmp);
		endTime = System.currentTimeMillis();

		System.out.println("selectionSort():" + (endTime - startTime) + " milliseconds.");

	}
}
